 /**
 * LibSpider.
 * Open Source implementation of Spotify's propierty view framework of Spotify client
 * */

#include "luahtml/luahtml.h"


char * spider_process_layout(lua_State *luaState, char *fileName) {
	lua_State *L = lua_open();
	luaL_openlibs(L);
	lua_pushnumber(L, 128);
	lua_setglobal(L, "token");
	luaHtml_call(L, "view.xml");
	lua_getglobal(L, "result");
	char *markup = (char *)lua_tostring(L, -1);
	lua_pop(L, 1);
	lua_close(L);
	return markup;
}